package a;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;

public class Start {
	// private static Logger logger = Logger.getLogger(Start.class);
	/**
	 * @param args
	 * @throws IOException
	 * @throws InterruptedException
	 */
	public static void main(String[] args) throws IOException,
			InterruptedException {
		// PropertyConfigurator.configure("src/log4j.xml");
		// while (true) {
		// logger.info("info");
		// logger.debug("debug");
		// logger.error("error");
		// logger.fatal("fatal");
		// logger.warn("warn");
		// Thread.sleep(1000 * 10);
		// }
		fun();
	}

	public static void fun() {
		boolean[] boolArray = new boolean[] { true, false, true };
		JSONArray jsonArray1 = JSONArray.fromObject(boolArray);
		System.out.println(jsonArray1);
		// prints [true,false,true]

		List list = new ArrayList<String>();
		list.add("first");
		list.add("second");
		JSONArray jsonArray2 = JSONArray.fromObject(list);
		System.out.println(jsonArray2);
		// prints ["first","second"]

		JSONArray jsonArray3 = JSONArray.fromObject("['json','is','easy']");
		System.out.println(jsonArray3);
	}
}
